<!--header str-->
{template "common","header"}
<!--header end-->
<script type="text/javascript">
<!--
$(document).ready(function(){  
	$('#submit_comment').click(function(){
		var comment = $('#comment_content').val()
		var c_id = '{$crowdfunding[id]}'
		if(comment != ''){
			$.ajax({ 
		        type: "GET", 
		        url: "/index.php?m=hchindex&c=ajax&a=takecomment&type=1&comment="+comment+"&id="+c_id,
		        success: function(msg){
					if(msg=="nologin"){
						alert('请先登录');return false;
					}
					if(msg=="nocontent"){
						alert('请输入评论内容');return false;
					}
		        	alert('评论成功');
		        	window.location.reload()
		        }  
			  }); 
		}
		
		
	})
	$('#fav').click(function(){
		var c_id = '{$crowdfunding[id]}';
		var c_name = '{$crowdfunding[name]}';
		$.ajax({ 
	        type: "GET", 
	        url: "/index.php?m=hchindex&c=ajax&a=fav&id="+c_id+"&name="+c_name,
	        success: function(data){	        	
	        	alert('关注成功');
	        	window.location.reload()
	        }  
		  }); 
		
	})
	
})
function tozan(obj,id,zannum){
	$.ajax({ 
	       type: "GET", 
	       url: "/index.php?m=hchindex&c=ajax&a=zan&id="+id,
	       success: function(){
	    	   window.location.reload()
	       }  
	}); 
		
}
//-->
</script>
<!--wrap_activity str-->
<style>
.ul_line .xuanzhong{background-color:#0000aa;}
</style>
<div class="wrap" id="wrap">
<table width="100%">
	<tr>
		<td colspan="2">{template "common","bullet_info"}</td>
	</tr>
	<tr>
		<td colspan="2"><hr></td>
	</tr>
	<tr>
		<td class="crowdfunding_left_content">
			<table>
			<tr>
				<td>
                    <div class="title heiti">项目简介</div>
                    <div style="float:right;">{$info[area_name]}</div>
                </td>
			</tr>
			<tr>
				<td><img width=800 height=400 class="crowdfunding_left_content_img" alt="" src="{$crowdfunding[img]}"></td>
			</tr>
			<tr>
				<td class="ul_line">
					<ul>
						<li {if $key=="product_introduction"}class="xuanzhong"{/if}>&nbsp;&nbsp;<a href="{$curURL}&sub_id={$subId}&key=product_introduction" >产品介绍</a>&nbsp;&nbsp;</li>
						<li {if $key=="prject_info"}class="xuanzhong"{/if}>&nbsp;&nbsp;<a href="{$curURL}&sub_id={$subId}&key=prject_info" >项目介绍</a>&nbsp;&nbsp;</li>
						<li {if $key=="team_info"}class="xuanzhong"{/if}>&nbsp;&nbsp;<a href="{$curURL}&sub_id={$subId}&key=team_info" >团队介绍</a>&nbsp;&nbsp;</li>
						<li {if $key=="history"}class="xuanzhong"{/if}>&nbsp;&nbsp;<a href="{$curURL}&sub_id={$subId}&key=history" >发展历史</a>&nbsp;&nbsp;</li>
						<li {if $key=="bussiness_plan"}class="xuanzhong"{/if}>&nbsp;&nbsp;<a href="{$curURL}&sub_id={$subId}&key=bussiness_plan" >商业计划书</a>&nbsp;&nbsp;</li>
						<li {if $key=="report"}class="xuanzhong"{/if}>&nbsp;&nbsp;<a href="{$curURL}&sub_id={$subId}&key=report" >公司报道</a>&nbsp;&nbsp;</li>
						<li {if $key=="qa"}class="xuanzhong"{/if}>&nbsp;&nbsp;<a href="{$curURL}&sub_id={$subId}&key=qa" >常见问答</a>&nbsp;&nbsp;</li>
					</ul>
				</td>
			</tr>
			<tr>
				<td class="content">
					<label class="title">{$info[name]}</label>
					<br/>
					{if $key=="prject_info"} 
						
					{else}
						{$info[content]}
					{/if}
				</td>
			</tr>
			<tr>
				<td class="comment">
					<div class="comment_title">
						<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发表评论</label>
					</div>
					<div class="comment_content">
						{if $this->isLogin}
						<div><textarea rows="5" cols="80" name="comment_content" id="comment_content"></textarea></div>
						{else}
						<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <label><a href="/index.php?m=hchmember&c=index&a=login" >请先登录</a></label>
						{/if}
					</div>
					<div class="commit_submit">
						<input type="button" name="submit_comment" id="submit_comment" value="提交评论" >
						<input type="hidden" name="c_id" id="c_id" value="{$info[id]}">
					</div>
				</td>
			</tr>
			<tr>
				<td>
					<div class="comment_list">
						<hr/>
						{loop $commentLists $comment}
						<table width="100%">
							<tr>
								<td rowspan="3">
									<img alt="" src="{$comment[img]}" width="70">
								</td>
								<td class="content_username">
									<label class="username">{$comment[username]}&nbsp;&nbsp;</label>
									<label class="update_time">{$comment[last_updated_time]}</label>
								</td>
							</tr>
							<tr>
								<td class="content_username">
									{$comment[content]}
								</td>
							</tr>
							<tr>
								<td colspan="3" align="right" width="100%" class="tozantd" >
									<a href="javascript:void(0)" onclick="tozan(this,{$comment[id]},{$comment[zan_number]})" > 
										<img alt="" src="/statics/images/huachuang/zan.png" class="tozan">
										(<label class="username" id="zan_num">{$comment[zan_number]}</label>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
										<!-- |<a href="#" >回复</a> -->
									</a>
								</td>
							</tr>
						</table>
						<hr/>
						{/loop}
					</div>
					<div id="pages"><?php echo $pages ?></div>
				</td>
			</tr>
			</table>
		</td>
		<td class="crowdfunding_right_content">
			{if $toFav}
			<div class="my_project_fav">
				<a id="fav" href="javascript:;">关&nbsp;&nbsp;注</a>
			</div>
			{/if}
			<div class="border1 content_top heiti">
				<table width="100%">
					<tr>
						<td><label>目标融资金额</label></td>
						<td><label>让出股权</label></td>
					</tr>
					<tr>
						<td>{$crowdfunding[amount]}</td>
						<td>{$crowdfunding[sell_rate]}</td>
					</tr>
				</table>
				<hr>
				<label>累计项目资金</label><br>
				<label>{$crowdfunding[current_amount]}</label>
				<div>已完成<?PHP echo floor($crowdfunding[current_amount]/$crowdfunding[amount]*100)?>%</div>
			</div>
			<div class="investor heiti">
				<label class="title">发起人</label>
				<hr>
				<ul>
					{if count($inverstorList)>0}
					{loop $inverstorList $inverstor}
					<table>
						<tr>
							<td>
								<img alt="" src="{$inverstor[img]}">
							</td>
							<td class="list">
								<p class="username">{$inverstor[user_name]}</p>
								<p>{$inverstor[company]}</p>
								<p>{$inverstor[position]}</p>
							</td>
						</tr>
					</table>
					{/loop}
					{else}
					<table>
						<tr>
							<td>
								&nbsp;
							</td>
						</tr>
					</table> 
					{/if}
				</ul>
			</div>
		</td>
	</tr>
</table>
	
</div>
<!--wrap end-->
<!--footer str-->
{template "common","footer"}
<!--footer end-->
</body>
</html>